<template>
	<view class="containers">		
		<view class="u-flex u-row-center u-m-50" v-if="list.length == 0" style="flex-direction: column;">
			<image style="width:300rpx;height:300rpx;" mode="widthFix" src="../../../static/img/nox.png"></image>
			<text style="color:#ccc">暂无消息</text>
		</view>
		<view v-for="(item,index) in list" :key="index">
		
			<view class="u-flex u-row-center all">
				<text class="data u-m-t-30 u-m-b-30">{{item.createTime}}</text>
			</view>
			<view class="see u-m-b-50">
				<view v-if="item.type == 11" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizp.png"></image>
					<text class="u-m-l-20 zhaop">招投标</text>
				</view>
				<view v-if="item.type == 5" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizp.png"></image>
					<text class="u-m-l-20 zhaop">招聘</text>
				</view>
				<view v-if="item.type == 6" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizp.png"></image>
					<text class="u-m-l-20 zhaop">应聘</text>
				</view>
				<view v-if="item.type == 1" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇团队</text>
				</view>
				<view v-if="item.type == 12" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇服务</text>
				</view>
				<view v-if="item.type == 9" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇活动</text>
				</view>
				<view v-if="item.type == 10" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇课堂</text>
				</view>
				<view v-if="item.type == 3" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇公社</text>
				</view>
				<view v-if="item.type == 2" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇N+1</text>
				</view>
				<view v-if="item.type == 7" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇信息</text>
				</view>
				<view v-if="item.type == 8" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇推广</text>
				</view>
				<view v-if="item.type == 4" class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">工程信息</text>
				</view>
				<view class="u-p-20 u-border-bottom">
					<view class="u-m-b-20"><text>需要：{{item.ineed}}</text></view>
					<view class="u-m-b-20"><text>意向：{{item.imean}}</text></view>
					<view class="name"><text>{{item.iam}}</text></view>
				</view>
				<view @click="ClickItem(item)" class="u-flex u-row-between">
					<view class="detail u-p-20">
						查看详情
					</view>
					<view>
						<u-icon name="arrow-right" color="#888E9A" size="28" class="u-m-r-20"></u-icon>
					</view>
				</view>
			</view>

			<!-- <view class="see">
				<view class="u-flex u-row-start u-border-bottom u-p-20">
					<image src="../../../static/img/pipeizh.png"></image>
					<text class="u-m-l-20 zhaop">智汇团队</text>
				</view>
				<view class="u-p-20 u-border-bottom">
					<view class="u-m-b-20"><text>需要：建筑设计师</text></view>
					<view class="u-m-b-20"><text>意向：设计师</text></view>
					<view class="name"><text>王富贵</text></view>
				</view>
				<view class="u-flex u-row-between">
					<view class="detail u-p-20">
						查看详情
					</view>
					<view>
						<u-icon name="arrow-right" color="#888E9A" size="28" class="u-m-r-20"></u-icon>
					</view>
				</view>
			</view> -->
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad(){
			this.initPage();
		},
		methods: {
			async initPage(){
				let result = await this.$apis.selectAllNotices();
				this.list = result.data
			},
			ClickItem(item) {
				this.$mRouter.push({
					route: this.$mRoutesConfig.ppxxxq,
					query:{
						data:encodeURIComponent(JSON.stringify(item))
					}
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	page,.containers {
		height:100vh;
		background-color: #f4f4f4;
	}

	.all {
		.data {

			font-size: 28rpx;

			color: #888E9A;
		}

	}

	.see {
		width: 710rpx;
		margin: 0 auto;
		background: #FFFFFF;
		border-radius: 20rpx;

		image {
			width: 36rpx;
			height: 36rpx;
		}

		.zhaop {

			font-weight: bold;
			font-size: 32rpx;
		}

		.name {

			color: #4C9CFF;
		}

		.detail {

			color: #888E9A;

			font-size: 28rpx;
		}
	}
</style>
